[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  TERMINAL

  .  Summary

  terminal();

  .  Description

  The terminal function when called allows Telix to process characters
  coming in from the serial port and print them on the terminal
  screen, and process user keystrokes. If a function has nothing to do
  (for example while using the track function), it can call terminal
  to make sure characters and user keystrokes are processed. Note that
  if a user script wants to process every incoming character (e.g.,
  with the cgetc function, the terminal function should never be
  called).

  .  Return Value

  None.

  .  Example

  // This will wait forever for either of two strings
  // to come in from the comm port, and then stop.

  int t1, t2, stat;

  t1 = track("hello", 0);
  t2 = track("good-bye", 0);

  while (1)           // loop forever
   {
    terminal();       // The call to terminal() lets any characters
                      // that come in be looked at by Telix's
                      // internal routines for a match with.
                      // Incoming chars are also printed on the
                      // terminal screen and user keystrokes are
                      // handled

    stat = track_hit(0);
    if (stat == t1 || stat == t2)   // exit if one of the strings
     break;                         // came in
   }

  track_free(t1);     // stop Telix for looking for more matches
  track_free(t2);

See Also: track track_addchr
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson